package com.irdstudio.bsp.console.service.facade;

import java.util.List;

import com.irdstudio.bsp.console.service.vo.BpmNodeInfoVO;

/**
 * <p>Description:流程节点信息				<p>
 * @author srvadmin
 * @date 2020-07-24
 */
public interface BpmNodeInfoService {
	
	public List<BpmNodeInfoVO> queryAllOwner(BpmNodeInfoVO bpmNodeInfoVo);
	
	public List<BpmNodeInfoVO> queryAllCurrOrg(BpmNodeInfoVO bpmNodeInfoVo);
	
	public List<BpmNodeInfoVO> queryAllCurrDownOrg(BpmNodeInfoVO bpmNodeInfoVo);
	
	public int insertBpmNodeInfo(BpmNodeInfoVO inBpmNodeInfoVo);
	
	public int deleteByPk(BpmNodeInfoVO bpmNodeInfoVo);
	
	public int updateByPk(BpmNodeInfoVO bpmNodeInfoVo);
	
	public BpmNodeInfoVO queryByPk(BpmNodeInfoVO bpmNodeInfoVo);

	public static enum BpmNodeTypeEnum {

		Start("N01", "开始节点"),
		PluginApproveConf("N03", "审批节点"),
		PluginCountersignConf("N04", "会签节点"),
		PluginContentionConf("N05", "竟办节点"),
		PluginAssignConf("N06", "分单节点"),
		Task("N07", "内部服务"),
		End("N99", "结束节点");

		private String code;
		private String name;
		BpmNodeTypeEnum(String code, String name) {
			this.code = code;
			this.name = name;
		}

		public String getCode() {
			return code;
		}

		public String getName() {
			return name;
		}

		public static BpmNodeTypeEnum get(String code) {
			if (code == null) {
				return null;
			}
			for (BpmNodeTypeEnum type : BpmNodeTypeEnum.values()) {
				if (type.getCode().equals(code)) {
					return type;
				}
			}
			return null;
		}
	}

}
